package com.gmp.product.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.gmp.product.mapper.SampleRetentionInfoMapper;
import com.gmp.product.domain.SampleRetentionInfo;
import com.gmp.product.service.ISampleRetentionInfoService;

/**
 * 取样留样信息Service业务层处理
 *
 * @author Koi
 * @date 2025-10-27
 */
@Service
public class SampleRetentionInfoServiceImpl extends ServiceImpl<SampleRetentionInfoMapper, SampleRetentionInfo> implements ISampleRetentionInfoService {
    @Autowired
    private SampleRetentionInfoMapper sampleRetentionInfoMapper;

    /**
     * 查询取样留样信息
     *
     * @param id 取样留样信息主键
     * @return 取样留样信息
     */
    @Override
    public SampleRetentionInfo selectSampleRetentionInfoById(String id) {
        return sampleRetentionInfoMapper.selectSampleRetentionInfoById(id);
    }

    /**
     * 查询取样留样信息列表
     *
     * @param sampleRetentionInfo 取样留样信息
     * @return 取样留样信息
     */
    @Override
    public List<SampleRetentionInfo> selectSampleRetentionInfoList(SampleRetentionInfo sampleRetentionInfo) {
        return sampleRetentionInfoMapper.selectSampleRetentionInfoList(sampleRetentionInfo);
    }

    /**
     * 新增取样留样信息
     *
     * @param sampleRetentionInfo 取样留样信息
     * @return 结果
     */
    @Override
    public int insertSampleRetentionInfo(SampleRetentionInfo sampleRetentionInfo) {
        return sampleRetentionInfoMapper.insertSampleRetentionInfo(sampleRetentionInfo);
    }

    /**
     * 修改取样留样信息
     *
     * @param sampleRetentionInfo 取样留样信息
     * @return 结果
     */
    @Override
    public int updateSampleRetentionInfo(SampleRetentionInfo sampleRetentionInfo) {
        return sampleRetentionInfoMapper.updateSampleRetentionInfo(sampleRetentionInfo);
    }

    /**
     * 批量删除取样留样信息
     *
     * @param ids 需要删除的取样留样信息主键
     * @return 结果
     */
    @Override
    public int deleteSampleRetentionInfoByIds(String[] ids) {
        return sampleRetentionInfoMapper.deleteSampleRetentionInfoByIds(ids);
    }

    /**
     * 删除取样留样信息信息
     *
     * @param id 取样留样信息主键
     * @return 结果
     */
    @Override
    public int deleteSampleRetentionInfoById(String id) {
        return sampleRetentionInfoMapper.deleteSampleRetentionInfoById(id);
    }
}
